﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MockPrjTeam2.DAO;
using MockPrjTeam2.Entity;

namespace MockPrjTeam2.Biz
{
    public class AddressBiz
    {
        AddressDao dao = new AddressDao();
        public List<Address> getAllAddress() 
        {
            return dao.getAllAddress();
        }
        public List<Address> getAddressesByKey(String postCode, String addr, String town)
        {
            return dao.getAddressesByKey(postCode,addr,town);
        }
        public bool addAddress(Address address)
        {
            return dao.addAddress(address);
        }
        public bool updateAddress(Address address)
        {
            return dao.updateAddress(address);
        }
        public Address getbyId(int id)
        {
            return dao.getById(id);
        }
    }
}